package org.freedoit.server.om;

// Generated Oct 11, 2012 3:54:05 PM by Hibernate Tools 3.4.0.CR1

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

@Entity
@Table(name = "user")
public class User implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -206466897831077272L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "user_id", unique = true, nullable = false)
	private Long userId;
	
	@Column(name = "user_name", nullable = false)
	private String userName;
	
	@Column(name = "user_key", nullable = false)
	private String userKey;

	@Column(name = "create_date", nullable = false)
	private Timestamp createDate;
	
	@Column(name = "status", nullable = false)
	private Integer status;

	@Version
	@Column(name = "latest_client_id", nullable = false)
	private Long latestClientId;

	public User() {
	}

	public User(String userName, String userKey, Timestamp createDate, Integer status) {
		this.userName = userName;
		this.userKey = userKey;
		this.createDate = createDate;
		this.status = status;
	}

	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserKey() {
		return this.userKey;
	}

	public void setUserKey(String userKey) {
		this.userKey = userKey;
	}

	public Timestamp getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Timestamp createDate) {
		this.createDate = createDate;
	}

	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Long getLatestClientId() {
		return this.latestClientId;
	}

	public void setLatestClientId(Long latestClientId) {
		this.latestClientId = latestClientId;
	}
}
